package com.kd.config;

import java.util.Properties;

import com.kdtech.utils.PropertiesUtils;

public class DefaultConfig {
	
	public static final String SERVER_IP;
	public static final int PORT;
	
	public static final String DIR;
	public static final int SCAN_SECONDS;
	
	static {
		Properties pro = PropertiesUtils.getProperties("data_index.properties");
		SERVER_IP = pro.getProperty("index_create_server.ip");
		PORT = Integer.parseInt(pro.getProperty("index_create_server.port"));
		DIR = pro.getProperty("inside.stored_dir");
		SCAN_SECONDS = Integer.parseInt(pro.getProperty("scan.seconds", "6"));
		if(null==DIR || "".equals(DIR)) {
			throw new RuntimeException("please re-config inside stored directory!");
		}
	}

	private DefaultConfig() {
		
	}
}
